- add_page_specific_style 'page_bundles/promotions'
- promotion_feature = 'promote_weight_sidebar_dismissed'

- if show_promotions? && show_callout?(promotion_feature)
  .block.js-weight-sidebar-callout.promotion-issue-sidebar{ data: { uid: promotion_feature } }
    .sidebar-collapsed-icon{ data: { toggle: "dropdown", target: ".js-weight-sidebar-callout" } }
      %span{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: _("Weight") }
        = sprite_icon('scale')
        %span No
    .title.hide-collapsed
      = s_('Promotions|Weight')
    .hide-collapsed.js-toggle-container.promotion-issue-weight-sidebar-message
      = s_('Promotions|This feature is locked.')
      %a.btn-link.js-toggle-button.js-weight-sidebar-callout-btn{ href: '#' }
        = s_('Promotions|Learn more')
        = sprite_icon('chevron-up', css_class: 'js-sidebar-collapse hidden')
        = sprite_icon('chevron-down', css_class: 'js-sidebar-expand')
      .js-toggle-content{ style: 'display: none' }
        %div
          %h4
            = s_('Promotions|Weighting your issue')
          %p
            = image_tag('promotions/img-paid-feature-weight-sidebar.png', class: 'w-100 box-shadow-default')
          %p
            = s_('Promotions|When you have a lot of issues, it can be hard to get an overview. By adding a weight to your issues, you can get a better idea of the effort, cost, required time, or value of each, and so better manage them.')
          %p
            - if Gitlab::CurrentSettings.should_check_namespace_plan?
              - subscription_link_url = Gitlab::Saas.about_pricing_url
              - subscription_link_start = '<a href="%{url}" target="_blank" class="btn-link tr-issue-weights-bronze-features-cta">'.html_safe % { url: subscription_link_url }
              = s_("Promotions|See the other features in the %{subscription_link_start}Premium plan%{subscription_link_end}").html_safe % { subscription_link_start: subscription_link_start, subscription_link_end: '</a>'.html_safe }
            - else
              = s_('Promotions|Improve issues management with Issue weight and GitLab Enterprise Edition.')
          %div
            = render 'shared/promotions/promotion_link_project', short_form: true, target_blank: false, location: :issue_weights
            = link_to s_("Promotions|Not now, thanks!"), '#', class: ['gl-button', 'btn', 'js-close', 'js-close-callout', 'gl-mt-3', 'js-close-session', 'tr-issue-weights-not-now-cta']
